1. Field of the Invention
The present invention relates to a techniques that attains log-in from a plurality of log-in devices to a logged-in device via a predetermined communication path. More specifically the present invention pertains to a technique that is preferably applied in the case of communication between a plurality of devices according to an SBP (serial bus protocol)-2 protocol in a system where the devices are mutually connected via an IEEE 1394 bus.
2. Description of the Related Art
IEEE1394 is a serial bus standard proposed by IEEE and applied for transmission of digital data, and is defined by ‘IEEE STD. 1394-1995 IEEE Standard for a High Performance Serial Bus’.
The SBP-2 protocol (hereinafter referred to as the SBP-2) is recommended for standardization by ANSI X3T10 in the United States and is a protocol of a transport layer designed in conformity with the IEEE1394 standard.
In a system where a plurality of devices are mutually connected via an IEEE1394 bus, in the case where the SBP-2 is applied for communication between the devices, the device having a common memory is called an initiator and the device without the common memory is called a target.
The target has at least one logical unit, each providing a service. The initiator requires logging into the logical unit included in the target and establishing a right of using the logical unit that provides the service. In accordance with one concrete procedure, the initiator outputs a request of log-in to the logical unit included in the target and receives a response of accepted log-in from the logical unit.
When the use of the logical unit is concluded, the initiator logs out of the logical unit included in the target and discards the right of using the logical unit. In accordance with one concrete procedure, the initiator outputs a request of log-out to the logical unit included in the target and receives a response of accepted log-out from the logical unit.
A number of initiators that can gain simultaneous log-in (an allowable number of simultaneous log-in) is determined in advance in the design stage with regard to each logical unit included in the target. In the case where the number of initiators that currently log in a certain logical unit included in the target reaches the allowable number of simultaneous log-in preset with regard to the logical unit, the logical unit gives a response of failed log-in to any other initiators that have not yet logged in and currently give a request of log-in.
After receiving the response of failed log-in output from the logical unit, the initiator repeatedly outputs the request of log-in to the logical unit at preset time intervals to gain a response of accepted log-in. When one of the initiators that have logged in the logical unit logs out, the number of initiators that log in the logical unit becomes less than the allowable number of simultaneous log-in. When receiving a next request of log-in from the initiator that repeatedly gives the request of log-in, the logical unit gives a response of accepted log-in to the initiator. The initiator that has repeatedly given the request of log-in accordingly succeeds in logging into the logical unit and establishes a right of using the logical unit.
The following problems, however, arise in the prior art technique. In one example, it is assumed that a first initiator first gives a request of log-in to a certain logical unit included in the target and a second initiator then starts giving a request of log-in to the certain logical unit, while the number of initiators that currently log in the certain logical unit reaches the allowable number of simultaneous log-in. Under such conditions, both the first initiator and the second initiator continue outputting the request of log-in to the certain logical unit at different timings of preset time intervals. When any one of the initiators that have logged in the logical unit logs out, in some cases, the first initiator outputs a next request of log-in at an earlier timing than the second initiator outputs a next request of log-in. In this case, the first initiator that started giving the request of log-in first gains the log-in first. This causes no problem. In other cases, however, the first initiator outputs a next request of log-in at a later timing than the second initiator outputs a next request of log-in. In this case, the second initiator that started giving the request of log-in later gains the log-in prior to the first initiator.
When other initiators start giving the request of log-in, in addition to the second initiator, these initiators may log into the logical unit prior to the first initiator. In this case, it takes an undesirably long time for the first initiator to log into the logical unit and establish a right of using the logical unit.